#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (int argc, char const* argv[])
{
    int n, i;
    char buf[64];

    scanf("%d", &n);
    while (n--) {
        scanf("%s", buf);

        for (i = 0; i < strlen(buf); i++) {
            if (buf[i] == 'a' ||
                buf[i] == 'e' ||
                buf[i] == 'i' ||
                buf[i] == 'o' ||
                buf[i] == 'u') {
                buf[i] -= 32;
            } else if (buf[i] >= 'A' && buf[i] <= 'Z' && 
                        buf[i] != 'A' &&
                        buf[i] != 'E' &&
                        buf[i] != 'I' &&
                        buf[i] != 'O' &&
                        buf[i] != 'U') {
                buf[i] += 32;
            }

            printf("%c", buf[i]);
        }
        printf("\n");
    }

    return 0;
}
